package com.rec.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;



@Entity
@Table(name="teachers")
@NoArgsConstructor
@AllArgsConstructor
public class Teachers {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String cardno;
	private String name;
	private String sex;
	private Integer sectionid;
	private Integer status;
	@ManyToOne(targetEntity=Sections.class,fetch=FetchType.EAGER)
	@JoinColumn(name="sectionid",insertable=false,updatable=false)
	private Sections s;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCardno() {
		return cardno;
	}
	public void setCardno(String cardno) {
		this.cardno = cardno;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Integer getSectionid() {
		return sectionid;
	}
	public void setSectionid(Integer sectionid) {
		this.sectionid = sectionid;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Sections getS() {
		return s;
	}
	public void setS(Sections s) {
		this.s = s;
	}
	
}
